home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1440 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  884 b 

  1. Path: news.magi.com!news!news.magi.com
  2. From: nredding@magi.com (Neil Redding)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: GoTo equivalent in C ??
  5. Date: Sat, 13 Jan 1996 19:28:44 -0500
  6. Organization: Magi Data Consulting
  7. Message-ID: <nredding-1301961928440001@magi04p17.magi.com>
  8. References: <4d67vm$e5h@masala.cc.uh.edu>
  9. NNTP-Posting-Host: magi04p17.magi.com
  10.  
  11. In article <4d67vm$e5h@masala.cc.uh.edu>, sukku@menudo.uh.edu (sukumar) wrote:
  12.  
  13. >Hi,
  14. >        I have always thought about this. How do you get the effect of goto
  15. >in C without using "goto"?? For ex, if I have to check for an error in my
  16. >function for every computation I do, and then do some cleaning up, how do 
  17. >I do it. Here is an example:
  18. >
  19. Although no one likes to use goto, I think in this case where you want to
  20. have an error
  21. exit from deeply nested code you may as well go ahead and use it.
  22.  
  23. -- 
  24. Neil Redding
  25. Ottawa, Canada
  26.